
import Vue from 'vue'
import VueRouter from 'vue-router'
import axios from 'axios'
import VueAxios from 'vue-axios'

import configMng from './component/config/configManager'
import shici from './component/shici/shici'
import yqdebug from './component/yqdebugremote/yqdebug'
import autotest from './component/autotestdevice/autotest'
import productManager from "~/component/autotestdevice/productManager";
import deviceManager from "~/component/autotestdevice/deviceManager";
import testItemManager from "~/component/autotestdevice/testItemManager";
import testItemAction from "~/component/autotestdevice/testItemAction";
import feitian from "~/component/feitian/feitian";

Vue.use(VueRouter)
Vue.use(VueAxios, axios)

const routers = [
  {
    "path":"/configManager",
    "name":"configManager",
    component: configMng
  },
  {
    "path":"/shici",
    "name":"sici",
    component: shici
  },
  {
    "path":"/",
    "name":"sici",
    component: shici
  },
  {
    "path":"/debug_yqsl",
    "name":"debugyqsl",
    component: yqdebug
  },
  {
    "path":"/autotest",
    "name":"autotest",
    component: autotest
  },
  {
    "path":"/autotest/deviceManager",
    "name":"deviceManager",
    component: deviceManager
  },
  {
    "path":"/autotest/productManager",
    "name":"productManager",
    component: productManager
  },
  {
    "path":"/autotest/testItemAction",
    "name":"testItemAction",
    component: testItemAction
  },
  {
    "path":"/autotest/testItemManager",
    "name":"testItemManager",
    component: testItemManager
  },
  {
    "path":"/feitian",
    "name": "feitian",
    component: feitian
  }
]

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  // 直接使用 routers 就是错误的，这也是个特殊的语法，挺奇怪
  routes: routers
})

export default router